home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19990422-19990725 / 000287_news@columbia.edu _Mon Jul 19 09:55:04 1999.msg < prev    next >
Internet Message Format  |  2020-01-01  |  5KB

  1. Return-Path: <news@columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id JAA12716
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Mon, 19 Jul 1999 09:55:04 -0400 (EDT)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id JAA06455
  7.     for kermit.misc@watsun.cc.columbia.edu; Mon, 19 Jul 1999 09:38:40 -0400 (EDT)
  8. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  9. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  10. Subject: Re: default file destination after a reconnection.
  11. Date: 19 Jul 1999 13:38:38 GMT
  12. Organization: Columbia University
  13. Message-ID: <7mv9ou$69k$1@newsmaster.cc.columbia.edu>
  14. To: kermit.misc@columbia.edu
  15.  
  16. In article <379288D1.6A692568@hastdeer.com.au>,
  17. Rob Irvine  <robi@hastdeer.com.au> wrote:
  18. : We use kermit to send files from a Sun Sparc 7 Unix kermit (6.0.192)
  19. : client to a Win95 Kermit 95 (1.1.17) server using the following 2
  20. : scripts.  This all works just fine with the Server PC being in a
  21. : warehouse.  My problem occurs if the PC is stopped for some reason and
  22. : the Unix client initiates the following script while it is stopped.  It
  23. : waits till the PC is brought up, but sends the first file to the default
  24. : c:\k95 directory instead of c:\scar\host. I have tried putting the whole
  25. : pathname\filename in the send line ,  but this doesn't make any
  26. : difference.  The second file is transmitted correctly.  As I have at
  27. : least 2 applications using the server I cannot use a server-side default
  28. : directory but need the file to go where I want it even if  there has
  29. : been an interrupted transmission.
  30. : I have tried setting timeout to 0 but the client just goes to sleep and
  31. : never awakes and there doesn't seem to be any option to set retry to
  32. : forever (the limit is 999).
  33. Timeout 0 means no timeout.  Retries refer to retransmission of corrupted
  34. packets.  If you have to retransmit the same packet 1000 times, you probably
  35. don't have a usable connection.
  36.  
  37. If you are trying to catch the situation in which the PC's modem answers
  38. the phone but the PC is not running, a better approach is something like
  39. this:
  40.  
  41.   while true {                         ; Loop forever
  42.       dial <phone-number>              ; Dial the PC's number
  43.       xif fail {                       ; No answer
  44.           pause 60                     ; Wait a minute 
  45.           continue                     ; and try again
  46.       }
  47.       set retry 2                      ; Call was answered
  48.       for \%i 1 10 1 {                 ; See if the server is there
  49.           remote pwd                   ; This command has a short answer
  50.           if success goto haveserver   ; Got an answer
  51.           pause 60                     ; No answer - keep trying
  52.       }
  53.       hangup                           ; Still no answer - hang up
  54.   }                                    ; and redial
  55.   
  56.   :haveserver
  57.   ...
  58.  
  59. : Unix script
  60. ; ( bnestt is a terminal server on our lan, with the PC connected to port 15)
  61. ;
  62. : set net tcp
  63. : set host bnestt 2015
  64. : set command bytesize 8
  65. : set terminal bytesize 8
  66. : set parity none
  67. : set duplex full
  68. : fast
  69. : set flow-control xon
  70. : set handshake none
  71. : set exit warning off
  72. : remote cd c:/scar/host
  73. :
  74. if fail stop 1 REMOTE CD c:/scar/host failed
  75.  
  76. : send /usr/hd/vca/hdkrdn2686 C649745.PK2
  77. : if failure goto :noupload1
  78. : remote cd c:/bcar/host
  79. :
  80. if fail stop 1 REMOTE CD c:/bcar/host failed
  81.  
  82. : send /usr/hd/vca/hdkrdn3686 C649745.DA2
  83. : if failure goto :noupload2
  84. : :quit
  85. : quit
  86. : :noupload1
  87. : echo  ERROR NO UPLOAD 1
  88. : goto :quit
  89. : :noupload2
  90. : echo  ERROR NO UPLOAD 2
  91. : goto :quit
  92. Just use STOP 1 for all this - it does the same thing in one statement.
  93.  
  94. : Win95 script
  95. : ; FILE K95CUSTOM.INI -- Kermit 95 Customizations
  96. : assign \%a com1
  97. : set line \%a
  98. :
  99. if fail stop 1 can't open port \%1
  100.  
  101. : set speed 9600
  102. : set parity none
  103. : :ok
  104. : set duplex full
  105. : set carrier-watch off
  106. : set handshake none
  107. : set flow-control xon
  108. : set terminal bytesize 8
  109. : set file display serial
  110. : set file collision overwrite
  111. : enable delete
  112. : fast
  113. : log transactions
  114. : show version
  115. : show comm
  116. : server
  117. : End ; of K95CUSTOM.INI
  118.  
  119. Why not use an ANSWER command to have K95 wait for the phone call to
  120. come in?  Something like:
  121.  
  122.   while true {
  123.       answer
  124.       xif fail {
  125.           hangup
  126.           continue
  127.       }
  128.       server
  129.   }
  130.  
  131. The script looks OK.  I've suggested some changes for simplicity, robustness,
  132. and error-catching.
  133.  
  134. I don't see anything that would explain the problem you have described except
  135. perhaps the possibility that c:/bcar/host exists on your PC, but c:/scar/host
  136. does not.  That's the most obvious explanation for why the first file goes in
  137. the wrong place and the second one goes in the right place.
  138.  
  139. - Frank